<?php
use com\gdl\common\dataobject\common\ResultDO; 
use com\gdl\newagk\interfaces\AdminSectionsServiceIf;
use com\gdl\newagk\dataobject\adminsections\SectionsDTO; 
require(dirname(dirname(__FILE__)) ."/php_sdk-master/include.php");
use MagicCrypt\MagicCrypt;
/**
 * 后台章节列表
 * 包含列表 修改 添加
 */
class api_AdminSectionsService extends api_Abstract implements AdminSectionsServiceIf{ 
    /**
     * 章节分类列表
     */
    public function sectionsList(SectionsDTO $section)
    { 
        $username = $user->username ? gdl_lib_BaseUtils::getStr($user->username) : "";
        $password = $user->password ? gdl_lib_BaseUtils::getStr($user->password) : "";
        $platform =  $user->platform ? gdl_lib_BaseUtils::getStr($user->platform, 'int') : 0;
		$result = new ResultDO();
        $result->success = false;
        $result->code = 0; 
        $result->data = []; 
        try{
                $result->success = true;
                return $result;
        } catch (Exception $e) {
                $result->success = false;
                $result->code = $e->getCode();
                $result->message = $e->getMessage(); 
        }
        return $result; 
    }
    /**
     *  添加章节
     */
    public function addSection(SectionsDTO $section){ 
	$result = new ResultDO();
        $result->code = 400;
        $result->success = true;
        $result->data[] = [];
     
        try{
		 
        } catch (Exception $e) {
            $result->success = false;
            $result->code = $e->getCode();
            $result->message = $e->getMessage(); 
        }
        return $result;
    }
    /**
     *  修改章节
     */
    public function ediSection(SectionsDTO $section){
        $result = new ResultDO();
        $result->code = 400;
        $result->success = true;
        $result->data[] = [];
         
        try{
           
        }catch(Exception $e){
            $result->success = false;
            $result->code = $e->getCode();
            $result->message = $e->getMessage(); 
        }
        return $result;
    }
     
   
}
